﻿using CoreShop.App.Scale;
using CoreShop.Model;
using CoreShop.PrintService;
using Org.BouncyCastle.Crypto.Macs;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace CoreShop.App
{

    //全局变量
    public class AppConstVars
    {
        public static string sVersion = "柚子收银前台";
        //public static Int64 sUpgradeVer = 2025101602; //本程序版本号ID,20190816001=1.0  
        public static string sPosVersion = "系统版本：V2.0.25.1124.04";//版本.号.月.日+序号

        #region 打印相关
        //public static PrintServices printServices = null;//本地默认打印方案（打印机初始化)


        #endregion
        public static corecmsexchange exchange = new corecmsexchange();
        public static corecmssystemsetup systemsetup = new corecmssystemsetup();
        public static corecmspayaccount payaccount = new corecmspayaccount();//支付参数
        public static syssetting syssetting = new syssetting();//后台参数
        public static sysuser sysUser = new sysuser();
        public static List<sysrolepos> sysUserRole = null;
        public static sysroleinfo sysUserRoleInfo = new sysroleinfo();
        public static corecmsstore sysStore = new corecmsstore();
        public static List<corecmspayments> sysPayments = null;
        public static string adminPassword = "CnroV9U5jlqSuKwTqliN6w==";//"Admin@609"
        public static bool isAdminUser = false;//是否用超级密码登录
        public static bool LoginState = true;//登录状态

        public static Int64 classId = 0;//班次Id
        public static string classNumber = "";//班次编号
        public static bool isMoreSite = true;//是否多站点
        public static bool showFullScreen = true;//是否多站点
        public static string sUrl = "http://app.pos08.com/";

        //钱箱连接方式
        public static int mCashBoxType = 0;
        public static string mCashBoxPort = "COM1";

        //电子秤相关
        public static int mWeighMode = 0;//称重商品方式，0下单前称重，1是下单后称重        
        public static int mConvert = 0;
        public static int mScaleType = 0;
        public static int mReadType = 0;//读取数量方式,0实时，1稳定

        //商品图片下载
        public static Gac.DownLoadFile downLoadFile = new Gac.DownLoadFile();
        public static bool isDownLoadFile = false;//要下载的商品图片标记
        public static string[] files_LocaleImgs = null;
        public static string[] files_GoodsImgs = null;

        //收款小精灵
        public static bool isQueryPay = true;//是否进行查询

        //顾显相关
        public static string sAdvUrl = "http://www.pos08.com/";//广告 URL
        public static string sAdvUrlShop = "http://erp.posyun3721.com/";//门店广告 URL
        public static int sAdvGoodImg = 0;//产品图片广告

        public static Mutex mut_UpLoad = new Mutex();
        public static Mutex mut_DownLoad = new Mutex();
        public static Mutex mut_Interface = new Mutex();

        public static bool ExitFlag = false;
        public static bool SynDataFlag = true;

        /// <summary>
        /// 副屏广告地址
        /// </summary>
        public static string SecondScreemImg = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SecondScreemImg");            
    }
}